#ifndef _NUMBERGENERATOR_H_
# define _NUMBERGENERATOR_H_

# include <SDL/SDL.h>
# include <map>
# include <vector>

struct NGConfig
{
public:
	Uint32 Possibilities;
	Uint32 Time;
	Uint32 Number;

public:
	NGConfig(Uint32 _possibilities, Uint32 _time, Uint32 _number);
	NGConfig(NGConfig const& _ngConfig);
	~NGConfig();

	NGConfig& operator=(NGConfig const& _ngConfig);
	bool operator==(NGConfig const& _ngConfig) const;
	bool operator!=(NGConfig const& _ngConfig) const;
};

class NumberGenerator
{
private:
	NGConfig m_config;
	Uint32 m_number;
	Uint32 m_time;
	//std::map<Uint32, Uint32> m_values;
	Uint32* m_values;

public:
	NumberGenerator(NGConfig const& _config);
	~NumberGenerator();

	Uint32 Generate();
	void IncreaseTime();
	void IncreaseNumber();

	NGConfig& GetConfig();
	Uint32 GetNumber() const;
	void GetResult(std::vector< std::pair<Uint32, Uint32> >& _values, Uint32 _number) const;
	Uint32 GetTime() const;

	void SetConfig(NGConfig const& _config);
};

#endif // _NUMBERGENERATOR_H_
